home *** CD-ROM | disk | FTP | other *** search
/ Champak 123 / (Vol 123) Jan 13 2011.iso / Games / go-fishing.swf / scripts / DefineButton2_226 / BUTTONCONDACTION on(keyPress Space).as < prev    next >
Text File  |  2011-01-13  |  881b  |  42 lines

  1. on(keyPress "<Space>"){
  2.    if(eval("/:movie_enable") == "0")
  3.    {
  4.       set("/:resume","0");
  5.       if(eval("/:p") < eval("/:power"))
  6.       {
  7.          tellTarget("/power")
  8.          {
  9.             prevFrame();
  10.          }
  11.          set("/:power","1");
  12.       }
  13.       else
  14.       {
  15.          set("/:power",eval("/:power") + "1");
  16.       }
  17.       if(eval("/:c") < eval("/:contract"))
  18.       {
  19.          if(getProperty("/ship", _currentframe) == "1")
  20.          {
  21.             tellTarget("/ship")
  22.             {
  23.                gotoAndPlay(21);
  24.             }
  25.             set("/:movie_enable","1");
  26.          }
  27.          else
  28.          {
  29.             tellTarget("/ship")
  30.             {
  31.                prevFrame();
  32.             }
  33.          }
  34.          set("/:contract","1");
  35.       }
  36.       else
  37.       {
  38.          set("/:contract",eval("/:contract") + "1");
  39.       }
  40.    }
  41. }
  42.